class PersonalCenterResponse {
  MemberInfo memberInfo;
  Style style;
  Vip vip;
  OrderStatusTotal orderStatusTotal;
  Store store;
  CouponInfo couponInfo;
  List<OftenFunction> oftenFunction;

  PersonalCenterResponse(
      {this.memberInfo,
      this.style,
      this.vip,
      this.orderStatusTotal,
      this.store,
      this.couponInfo,
      this.oftenFunction});

  PersonalCenterResponse.fromJson(Map<String, dynamic> json) {
    memberInfo = json['MemberInfo'] != null
        ? new MemberInfo.fromJson(json['MemberInfo'])
        : null;
    style = json['Style'] != null ? new Style.fromJson(json['Style']) : null;
    vip = json['Vip'] != null ? new Vip.fromJson(json['Vip']) : null;
    orderStatusTotal = json['OrderStatusTotal'] != null
        ? new OrderStatusTotal.fromJson(json['OrderStatusTotal'])
        : null;
    store = json['Store'] != null ? new Store.fromJson(json['Store']) : null;
    couponInfo = json['CouponInfo'] != null
        ? new CouponInfo.fromJson(json['CouponInfo'])
        : null;
    if (json['OftenFunction'] != null) {
      oftenFunction = new List<OftenFunction>();
      json['OftenFunction'].forEach((v) {
        oftenFunction.add(new OftenFunction.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.memberInfo != null) {
      data['MemberInfo'] = this.memberInfo.toJson();
    }
    if (this.style != null) {
      data['Style'] = this.style.toJson();
    }
    if (this.vip != null) {
      data['Vip'] = this.vip.toJson();
    }
    if (this.orderStatusTotal != null) {
      data['OrderStatusTotal'] = this.orderStatusTotal.toJson();
    }
    if (this.store != null) {
      data['Store'] = this.store.toJson();
    }
    if (this.couponInfo != null) {
      data['CouponInfo'] = this.couponInfo.toJson();
    }
    if (this.oftenFunction != null) {
      data['OftenFunction'] =
          this.oftenFunction.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class MemberInfo {
  String nickname;
  String headerImg;
  String phone;
  String signature;
  int isAutonym;

  MemberInfo(
      {this.nickname,
      this.headerImg,
      this.phone,
      this.signature,
      this.isAutonym});

  MemberInfo.fromJson(Map<String, dynamic> json) {
    nickname = json['Nickname'];
    headerImg = json['HeaderImg'];
    phone = json['Phone'];
    signature = json['Signature'];
    isAutonym = json['IsAutonym'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['Nickname'] = this.nickname;
    data['HeaderImg'] = this.headerImg;
    data['Phone'] = this.phone;
    data['Signature'] = this.signature;
    data['IsAutonym'] = this.isAutonym;
    return data;
  }
}

class Style {
  String bgPath;
  String capsulePath;
  Params params;

  Style({this.bgPath, this.capsulePath, this.params});

  Style.fromJson(Map<String, dynamic> json) {
    bgPath = json['BgPath'];
    capsulePath = json['CapsulePath'];
    params =
        json['Params'] != null ? new Params.fromJson(json['Params']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['BgPath'] = this.bgPath;
    data['CapsulePath'] = this.capsulePath;
    if (this.params != null) {
      data['Params'] = this.params.toJson();
    }
    return data;
  }
}

class Vip {
  int isVip;
  String desc;
  Params commonParams;

  Vip({this.isVip, this.desc, this.commonParams});

  Vip.fromJson(Map<String, dynamic> json) {
    isVip = json['IsVip'];
    desc = json['Desc'];
    commonParams = json['CommonParams'] != null
        ? new Params.fromJson(json['CommonParams'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['IsVip'] = this.isVip;
    data['Desc'] = this.desc;
    if (this.commonParams != null) {
      data['CommonParams'] = this.commonParams.toJson();
    }
    return data;
  }
}

class OrderStatusTotal {
  int waitPay;
  int waitSend;
  int waitReceiving;
  int waitEvaluate;
  int returnAfterSale;

  OrderStatusTotal(
      {this.waitPay,
      this.waitSend,
      this.waitReceiving,
      this.waitEvaluate,
      this.returnAfterSale});

  OrderStatusTotal.fromJson(Map<String, dynamic> json) {
    waitPay = json['WaitPay'];
    waitSend = json['WaitSend'];
    waitReceiving = json['WaitReceiving'];
    waitEvaluate = json['WaitEvaluate'];
    returnAfterSale = json['ReturnAfterSale'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['WaitPay'] = this.waitPay;
    data['WaitSend'] = this.waitSend;
    data['WaitReceiving'] = this.waitReceiving;
    data['WaitEvaluate'] = this.waitEvaluate;
    data['ReturnAfterSale'] = this.returnAfterSale;
    return data;
  }
}

class Store {
  int storeId;
  int type;
  String saleMoney;
  String balanceMoney;
  String waitMoney;
  String withdrawMoney;

  Store(
      {this.storeId,
      this.type,
      this.saleMoney,
      this.balanceMoney,
      this.waitMoney,
      this.withdrawMoney});

  Store.fromJson(Map<String, dynamic> json) {
    storeId = json['StoreId'];
    type = json['Type'];
    saleMoney = json['SaleMoney'];
    balanceMoney = json['BalanceMoney'];
    waitMoney = json['WaitMoney'];
    withdrawMoney = json['WithdrawMoney'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['StoreId'] = this.storeId;
    data['Type'] = this.type;
    data['SaleMoney'] = this.saleMoney;
    data['BalanceMoney'] = this.balanceMoney;
    data['WaitMoney'] = this.waitMoney;
    data['WithdrawMoney'] = this.withdrawMoney;
    return data;
  }
}

class CouponInfo {
  int totalNumber;
  List<PersonalCoupon> personalCoupon;

  CouponInfo({this.totalNumber, this.personalCoupon});

  CouponInfo.fromJson(Map<String, dynamic> json) {
    totalNumber = json['TotalNumber'];
    if (json['PersonalCoupon'] != null) {
      personalCoupon = new List<PersonalCoupon>();
      json['PersonalCoupon'].forEach((v) {
        personalCoupon.add(new PersonalCoupon.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['TotalNumber'] = this.totalNumber;
    if (this.personalCoupon != null) {
      data['PersonalCoupon'] =
          this.personalCoupon.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class PersonalCoupon {
  int id;
  int couponType;
  int usingType;
  String name;
  String discountsMoney;
  String fullMoney;
  String desc;
  int memberCouponId;

  PersonalCoupon(
      {this.id,
      this.couponType,
      this.usingType,
      this.name,
      this.discountsMoney,
      this.fullMoney,
      this.desc,
      this.memberCouponId});

  PersonalCoupon.fromJson(Map<String, dynamic> json) {
    id = json['Id'];
    couponType = json['CouponType'];
    usingType = json['UsingType'];
    name = json['Name'];
    discountsMoney = json['DiscountsMoney'];
    fullMoney = json['FullMoney'];
    desc = json['Desc'];
    memberCouponId = json['MemberCouponId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['Id'] = this.id;
    data['CouponType'] = this.couponType;
    data['UsingType'] = this.usingType;
    data['Name'] = this.name;
    data['DiscountsMoney'] = this.discountsMoney;
    data['FullMoney'] = this.fullMoney;
    data['Desc'] = this.desc;
    data['MemberCouponId'] = this.memberCouponId;
    return data;
  }
}

class OftenFunction {
  String name;
  String icon;
  Params params;

  OftenFunction({this.name, this.icon, this.params});

  OftenFunction.fromJson(Map<String, dynamic> json) {
    name = json['Name'];
    icon = json['Icon'];
    params =
        json['Params'] != null ? new Params.fromJson(json['Params']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['Name'] = this.name;
    data['Icon'] = this.icon;
    if (this.params != null) {
      data['Params'] = this.params.toJson();
    }
    return data;
  }
}

class Params {
  Params1 params;
  String type;
  String url;

  Params({this.params, this.type, this.url});

  Params.fromJson(Map<String, dynamic> json) {
    params =
        json['Params'] != null ? new Params1.fromJson(json['Params']) : null;
    type = json['Type'];
    url = json['Url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.params != null) {
      data['Params'] = this.params.toJson();
    }
    data['Type'] = this.type;
    data['Url'] = this.url;
    return data;
  }
}

class Params1 {
  int storeId;
  int type;

  Params1({this.storeId, this.type});

  Params1.fromJson(Map<String, dynamic> json) {
    storeId = json['store_id'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['store_id'] = this.storeId;
    data['type'] = this.type;
    return data;
  }
}
